package br.com.componentes;

import java.awt.Graphics2D;

import br.com.interfaces.ISprite;

public class Mapa implements ISprite
{
	int[][] mapa = { { 0, 1, 2, 3, 0, 1, 2, 3 }, 
					 { 0, 1, 2, 3, 0, 1, 2, 3 }, 
					 { 0, 1, 2, 3, 0, 1, 2, 3 }, 
					 { 0, 1, 2, 3, 0, 1, 2, 3 }, 
                     { 0, 1, 2, 3, 0, 1, 2, 3 },
                     { 0, 1, 2, 3, 0, 1, 2, 3 },
	                 { 0, 1, 2, 3, 0, 1, 2, 3 },
	                 { 0, 1, 2, 3, 0, 1, 2, 3 } }; 
	/* (non-Javadoc)
	 * @see br.com.interfaces.ISprite#draw(java.awt.Graphics2D)
	 */
	@Override
	public void draw( Graphics2D g2d )
	{
		Graphics2D g = (Graphics2D)g2d.create( );	
		
		for( int i = 0; i < mapa.length; i++ )
		{
			for( int j = 0; j < mapa[i].length; j++ )
			{
				Sprite obterSprite = SpriteMap.obterSprite( j );
				g.drawImage( obterSprite.getImage( ), (j*50), (i*50), null);	
			}
		}
		
		g.dispose( );
	}

	public void update( long time              ) { }
	public void move  ( int count, int direcao ) { }
}